diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index d61ea78..f414947 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -37,9 +37,11 @@
  * @param	string	field name
  * @return	string
  */	
-function js_insert_smiley($form_name = '', $form_field = '')
+if (! function_exists('js_insert_smiley'))
 {
-return <<<EOF
+	function js_insert_smiley($form_name = '', $form_field = '')
+	{
+		return <<<EOF
 <script type="text/javascript">
 	function insert_smiley(smiley)
 	{
@@ -47,8 +49,8 @@
 	}
 </script>
 EOF;
-}	
-
+	}	
+}
 // ------------------------------------------------------------------------
 
 /**
@@ -61,37 +63,40 @@
  * @param	string	the URL to the folder containing the smiley images
  * @return	array
  */	
-function get_clickable_smileys($image_url = '', $smileys = NULL)
+if (! function_exists('get_clickable_smileys'))
 {
-	if ( ! is_array($smileys))
+	function get_clickable_smileys($image_url = '', $smileys = NULL)
 	{
-		if (FALSE === ($smileys = _get_smiley_array()))
+		if ( ! is_array($smileys))
 		{
-			return $str;
-		}        
-	}
+			if (FALSE === ($smileys = _get_smiley_array()))
+			{
+				return $str;
+			}        
+		}
 
-	// Add a trailing slash to the file path if needed
-	$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+		// Add a trailing slash to the file path if needed
+		$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
 	
-	$used = array();
-	foreach ($smileys as $key => $val)
-	{
-		// Keep duplicates from being used, which can happen if the
-		// mapping array contains multiple identical replacements.  For example:
-		// :-) and :) might be replaced with the same image so both smileys
-		// will be in the array.
-		if (isset($used[$smileys[$key][0]]))
+		$used = array();
+		foreach ($smileys as $key => $val)
 		{
-			continue;
+			// Keep duplicates from being used, which can happen if the
+			// mapping array contains multiple identical replacements.  For example:
+			// :-) and :) might be replaced with the same image so both smileys
+			// will be in the array.
+			if (isset($used[$smileys[$key][0]]))
+			{
+				continue;
+			}
+	
+			$link[] = "<a href=\"javascript:void(0);\" onClick=\"insert_smiley('".$key."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";	
+	
+			$used[$smileys[$key][0]] = TRUE;
 		}
 	
-		$link[] = "<a href=\"javascript:void(0);\" onClick=\"insert_smiley('".$key."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";	
-	
-		$used[$smileys[$key][0]] = TRUE;
+		return $link;
 	}
-	
-	return $link;
 }
 
 // ------------------------------------------------------------------------
@@ -106,30 +111,33 @@
  * @param	string	the URL to the folder containing the smiley images
  * @return	string
  */	
-function parse_smileys($str = '', $image_url = '', $smileys = NULL)
+if (! function_exists('parse_smileys'))
 {
-	if ($image_url == '')
+	function parse_smileys($str = '', $image_url = '', $smileys = NULL)
 	{
-		return $str;
-	}
-
-	if ( ! is_array($smileys))
-	{
-		if (FALSE === ($smileys = _get_smiley_array()))
+		if ($image_url == '')
 		{
 			return $str;
-		}        
-	}
-	
-	// Add a trailing slash to the file path if needed
-	$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+		}
 
-	foreach ($smileys as $key => $val)
-	{        
-		$str = str_replace($key, "<img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" />", $str);
-	}
+		if ( ! is_array($smileys))
+		{
+			if (FALSE === ($smileys = _get_smiley_array()))
+			{
+				return $str;
+			}        
+		}
 	
-	return $str;
+		// Add a trailing slash to the file path if needed
+		$image_url = preg_replace("/(.+?)\/*$/", "\\1/",  $image_url);
+
+		foreach ($smileys as $key => $val)
+		{        
+			$str = str_replace($key, "<img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" />", $str);
+		}
+	
+		return $str;
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -142,24 +150,24 @@
  * @access	private
  * @return	mixed
  */	
-function _get_smiley_array()
+if (! function_exists('_get_smiley_array'))
 {
-	if ( ! file_exists(APPPATH.'config/smileys'.EXT))
+	function _get_smiley_array()
 	{
-		return FALSE;
-	}
+		if ( ! file_exists(APPPATH.'config/smileys'.EXT))
+		{
+			return FALSE;
+		}
 
-	include(APPPATH.'config/smileys'.EXT);
+		include(APPPATH.'config/smileys'.EXT);
 	
-	if ( ! isset($smileys) OR ! is_array($smileys))
-	{
-		return FALSE;
+		if ( ! isset($smileys) OR ! is_array($smileys))
+		{
+			return FALSE;
+		}
+	
+		return $smileys;
 	}
-	
-	return $smileys;
 }
 
-
-
-
 ?>
\ No newline at end of file
